// pro-index.js
Page({
  data: {
    avatarSrc: '',
    username: '',
    description: '',
    followStatus: '',
    followed: false
  },

  onLoad: function(options) {
    const { followed, avatarSrc, username, description } = options;
    this.setData({
      avatarSrc: avatarSrc || '',
      username: username || '',
      description: description || '',
      followed: followed === 'true',
      followStatus: followed === 'true' ? '已关注' : '关注'
    });
  },

  onFollowTap: function() {
    this.setData({
      followed: !this.data.followed,
      followStatus: this.data.followed ? '关注' : '已关注'
    });
  },

  onCooperationTap: function() {
    wx.navigateTo({
      url: '/pages/pro-talk/pro-talk'
    });
  }
});
